'use strict';

const {
	log
} = require("console");

const db = uniCloud.database();
exports.main = async (event, context) => {
	let {
		detail,
		picurls
	} = event
	log(picurls)
	return await db.collection("cloud_article").add({
		...detail,
		picurls,
		creationtime: Date.now(),
		uploadtime: Date.now()
	})
};